<template>
  <div>
    <my-button @click="isCreated = !isCreated">生命周期组件</my-button>
    <life v-if="isCreated"></life>
  </div>
</template>

<script>
import myButton from "../lesson7/my-button.vue";
import Life from "./life.vue";
export default {
  components: { myButton, Life },
  data() {
    return {
      isCreated: false,
    };
  },
};
</script>

<style>
</style>